import { request } from '../../../../api/request.js'

Page({
  data: {
    list: [],
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    this.getList()
  },
  // 判断token
  getList() {
    const { token } = wx.getStorageSync("token")
    const mytoken = {
      client: "app",
      token: token,
      version: "",
    }
    request({
      url: "/index/annualIncome",
      header: {
        "content-type": "application/json",
        "x-access-token": JSON.stringify(mytoken),
      },
      method: "POST",
    }).then(res => {
      this.setData({
        list: res.annualIncomeVos
      })
      console.log(res.annualIncomeVos)
    })

  },
})

